import request from '@/utils/request'

// 查询渠道合伙人列表
export function listPartner(query) {
  return request({
    url: '/third/apichannel/list',
    method: 'get',
    params: query
  })
}

// 查询渠道合伙人详细
export function getPartner(id) {
  return request({
    url: '/third/apichannel/' + id,
    method: 'get'
  })
}

// 新增渠道合伙人
export function addPartner(data) {
  return request({
    url: '/third/apichannel',
    method: 'post',
    data: data
  })
}

// 修改渠道合伙人
export function updatePartner(data) {
  return request({
    url: '/third/apichannel',
    method: 'put',
    data: data
  })
}

// 删除渠道合伙人
export function delPartner(id) {
  return request({
    url: '/third/apichannel/' + id,
    method: 'delete'
  })
}

// 导出渠道合伙人
export function exportPartner(query) {
  return request({
    url: '/third/apichannel/export',
    method: 'get',
    params: query
  })
}
